import Vue from 'vue'
import App from './App.vue'
import './registerServiceWorker'
import router from './router'
import store from './store'

//引入element-ui 组件
import ElementUI from 'element-ui';
import 'element-ui/lib/theme-chalk/index.css';

//引入axios 请求
import http from '../request.js';

//引入读卡机对象
import CardReader from '../read_card.js';

//挂载
Vue.prototype.$http = http;


//挂载
Vue.prototype.$CardReader = CardReader;


 
Vue.use(ElementUI);

Vue.config.productionTip = false

router.beforeEach((to, from, next) => {
    /* 路由发生变化修改页面title */
    if (to.meta.title) {
        document.title = to.meta.title
    }
    next()
})

new Vue({
  router,
  store,
  http,
  render: function (h) { return h(App) }
}).$mount('#app')
